import React from "react";
import ReactDOM from "react-dom/client";

// 创建 dom 根实例 相当于 vue的 app
const root = ReactDOM.createRoot(document.getElementById("root"));
const id = 'box'
const data = {
  a: 10,
  b: 20
}
const app = (title) => {
  return (
    <div>
      <h2>你好react</h2>
      <h3>{title}</h3>
      <button id={id}>按钮</button>
      <div className="container">11</div>
      <label htmlFor="xxx"></label>

      <div {...data}>box</div>
      {/* 这是注释 */}
    </div>
  );
};
root.render(app('react真好玩'));
